from django.urls import path
from . import views
from .views import get_rfid_info, get_card_list

app_name = 'back'  # 添加应用命名空间

urlpatterns = [
    path('write_finger/', views.write_finger, name='write_finger'),
    path('write_password/', views.write_password, name='write_password'),  # 新增密码录入路由
    path('login/', views.login_view, name='login'),
    path('dashboard/', views.dashboard_view, name='dashboard'),
    path('write_card/', views.write_card, name='write_card'),
    path('read_card/', views.read_card, name='read_card'),
    path('logout/', views.logout_view, name='logout'),  # 新增退出路由
    path('publish/', views.send_mqtt_message, name='publish'),
    path('get_rfid_info/', get_rfid_info, name='get_rfid_info'),
    path('get_card_list/', get_card_list, name='get_card_list'),  # 新增获取卡片列表路由
]
